ostree-repo.c: Fix file descriptor cleanup
authorOwen W. Taylor <otaylor@fishsoup.net>
Tue, 13 Sep 2016 13:03:53 +0000 (09:03 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 13 Sep 2016 13:19:10 +0000 (13:19 +0000)
commita5af1cb6888a2e4de5534be7623d08be277b801a
tree6103cb97c41d0d337eb19f9a7d5870a639dae0ad
parent5893b68ef76b10fc4267faa09d27588f2594b2f6
ostree-repo.c: Fix file descriptor cleanup

0 was used as an "unset" flag for tmp_dir_fd, which is technically
incorrect. For cache_dir_fd, -1 was used as the sentinal but 0
was checked for, resulting in close(-1).

Closes: #507
Approved by: cgwalters
src/libostree/ostree-repo.c